package com.zdd.ehe.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zdd.ehe.entity.DiseaseData;
import com.zdd.ehe.entity.ProvincePest;
import com.zdd.ehe.entity.Role;
import com.zdd.ehe.vo.ProvincePestVOByYear;
import com.zdd.ehe.vo.ProvincePestVo;

import java.time.Year;
import java.util.List;

/**
 * @version 1.0.0
 * @title: ProvincePestService
 * @author: HFLy
 * @description:
 * @date: 6/3/2023 下午2:31
 */
public interface ProvincePestService extends IService<ProvincePest> {
    List<ProvincePestVo> show(String type);

    /**
     * 分页查询各省份病虫害损失数据列表
     * @param page
     * @return
     */
    Page<ProvincePest> getAllProvincePestByPage(Page<ProvincePest> page);

    /**
     * 查询各年所有病虫害造成的损失
     * @param year
     * @return
     */
    List<ProvincePestVOByYear> getProvincePestByYear(Year year);


    /**
     * 查询各年某种病虫害造成的损失
     * @param disease
     * @return
     */
    List<ProvincePestVOByYear> getProvincePestByDisease(String disease);

    /**
     * 新增病虫害损失信息
     * @param provincePest
     * @return
     */
    int addProvincePest(ProvincePest provincePest);

    /**
     * 更新病虫害数据损失信息
     * @param provincePest
     * @return
     */
    int update(ProvincePest provincePest);

}
